<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>电子科大网络安全云平台</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">电子科大网络安全云平台</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <!-- 移动端显示 -->
            <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                <i class="layui-icon layui-icon-spread-left"></i>
            </li>

            <li class="layui-nav-item layui-hide-xs"><a href="">分支系统</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">追溯系统</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">备份系统</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">日志系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">日志服务01</a></dd>
                    <dd><a href="">日志服务02</a></dd>
                    <dd><a href="">日志服务03</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img">
                    <span id="show_username">&nbsp;&nbsp;&nbsp;&nbsp;</span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基础信息</a></dd>
                    <dd><a href="">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">基础数据管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="department.html">部门管理</a></dd>
                        <dd><a href="role.html">权限管理</a></dd>
                        <dd><a href="user.html">用户管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:;">漏洞扫描管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">扫描结果</a></dd>
                        <dd><a href="javascript:;">风险等级</a></dd>
                        <dd><a href="javascript:;">安全漏洞</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:;">基线任务管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">客户机管理</a></dd>
                        <dd><a href="javascript:;">基线管理</a></dd>
                        <dd><a href="javascript:;">客户机基线</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <div id="main" style="width: 100%;height: 1000px"></div>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        copyright©电子科技大学  www.uestc.edu.cn
    </div>
</div>
<script src="./layui/layui.js"></script>
<script src="./jquery/jquery-3.6.0.js"></script>
<script src="./echarts/echarts.min.js"></script>
<script>
    let username = localStorage.getItem("username");
    console.log("username=" + username);
    $("#show_username").html(username);

    let echarts_main = echarts.init(document.getElementById("main"));
    setTimeout(function () {
        option = {
            legend: {},
            tooltip: {
                trigger: 'axis',
                showContent: false
            },
            dataset: {
                source: [
                    ['product', '2012', '2013', '2014', '2015', '2016', '2017'],
                    ['Milk Tea', 56.5, 82.1, 88.7, 70.1, 53.4, 85.1],
                    ['Matcha Latte', 51.1, 51.4, 55.1, 53.3, 73.8, 68.7],
                    ['Cheese Cocoa', 40.1, 62.2, 69.5, 36.4, 45.2, 32.5],
                    ['Walnut Brownie', 25.2, 37.1, 41.2, 18, 33.9, 49.1]
                ]
            },
            xAxis: { type: 'category' },
            yAxis: { gridIndex: 0 },
            grid: { top: '55%' },
            series: [
                {
                    type: 'line',
                    smooth: true,
                    seriesLayoutBy: 'row',
                    emphasis: { focus: 'series' }
                },
                {
                    type: 'line',
                    smooth: true,
                    seriesLayoutBy: 'row',
                    emphasis: { focus: 'series' }
                },
                {
                    type: 'line',
                    smooth: true,
                    seriesLayoutBy: 'row',
                    emphasis: { focus: 'series' }
                },
                {
                    type: 'line',
                    smooth: true,
                    seriesLayoutBy: 'row',
                    emphasis: { focus: 'series' }
                },
                {
                    type: 'pie',
                    id: 'pie',
                    radius: '30%',
                    center: ['50%', '25%'],
                    emphasis: {
                        focus: 'self'
                    },
                    label: {
                        formatter: '{b}: {@2012} ({d}%)'
                    },
                    encode: {
                        itemName: 'product',
                        value: '2012',
                        tooltip: '2012'
                    }
                }
            ]
        };
        echarts_main.on('updateAxisPointer', function (event) {
            const xAxisInfo = event.axesInfo[0];
            if (xAxisInfo) {
                const dimension = xAxisInfo.value + 1;
                myChart.setOption({
                    series: {
                        id: 'pie',
                        label: {
                            formatter: '{b}: {@[' + dimension + ']} ({d}%)'
                        },
                        encode: {
                            value: dimension,
                            tooltip: dimension
                        }
                    }
                });
            }
        });
        echarts_main.setOption(option);
    });
</script>
</body>
</html>